home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1996 February / macformat-034.iso / mac / Shareware City / Applications / Laughing Bird Folder / The Laughing Bird Restaurant / The Laughing Bird Restaurant.dxr / 00272_ShowAllMenu 2.ls < prev    next >
Encoding:
Text File  |  1995-12-16  |  1.3 KB  |  40 lines

  1. on mouseUp
  2.   global theChoice, gOpenGates, gWhichMenu
  3.   set newLine to the mouseLine
  4.   put mouseLine
  5.   put newLine
  6.   if newLine < 3 then
  7.     nothing()
  8.   else
  9.     if the foreColor of line newLine of field gWhichMenu <> 5 then
  10.       set the foreColor of line newLine of field "ShowAllMenu 2" to 35
  11.       puppetSound("Click2")
  12.       updateStage()
  13.       alert("Until a password has been entered (at the start of the program), only the recipes in yellow will be accessible.")
  14.       set the foreColor of line newLine of field "ShowAllMenu 2" to 246
  15.       updateStage()
  16.       exit
  17.     end if
  18.     if the foreColor of line newLine of field gWhichMenu = 5 then
  19.       set the foreColor of line newLine of field "ShowAllMenu 2" to 138
  20.       puppetSound("Click2")
  21.       updateStage()
  22.       set the foreColor of line newLine of field "ShowAllMenu 2" to 5
  23.       set theText to line newLine of field "ShowAllMenu 2"
  24.       set numEnd to offset(")", theText)
  25.       if numEnd > 0 then
  26.         set theSelection to char 1 to numEnd - 1 of theText
  27.         set theChoice to value(theSelection)
  28.         put value(theSelection) into field "Count"
  29.         initPush(3, 12, 0)
  30.         init(15, 16, 0)
  31.         go("Recipes")
  32.         RecipeSelect()
  33.         set gWhichMenu to "ShowAllMenu 2"
  34.       else
  35.         exit
  36.       end if
  37.     end if
  38.   end if
  39. end
  40.